import Vue from 'vue'
import App from './App'
import store from './store/index.js'
import user from './store/modules/user.js'

Vue.config.productionTip = false
Vue.prototype.$imgErr = require('./static/image/imgerr.png')
Vue.prototype.$user = user;
App.mpType = 'app'


// 权限跳转
Vue.prototype.navigateTo = (options) => {
	if (!user.state.loginStatus) {
		uni.showToast({
			title: "请先登陆",
			icon: "none"
		})
		return uni.navigateTo({
			url: '/pages/login/index'
		})
	}
	uni.redirectTo(options)

}
Vue.prototype.$gaodeKey = '47fa3bcc499016104283079c04177447';//高德地图key
const app = new Vue({
	...App,
	store
})
app.$mount()
